﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LifeFlow.Servicer.Example.Models;

namespace LifeFlow.Servicer.Example.Controllers
{
    public partial class UserController
    {
        public class Version1_1 : Controller
        {
            /// <summary>
            /// Returns a user by ID (The user is actually hard-coded)
            /// </summary>
            /// <returns>A user</returns>
            [Service(Service = "User", Action = "GetUser", MinVersion = "1.1")]
            public ActionResult GetUser()
            {
                return Json(new User()
                {
                    Username = "mortenolsendk",
                    Email = "morten@trendsales.dk"
                }, JsonRequestBehavior.AllowGet);
            }
        }
    }
}